﻿using TripleClasses;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;

namespace UnitTests
{
    
   
    [TestClass()]
    public class TripleExtensionsTest
    {
        [TestMethod()]
        public void AsStringTest()
        {
            IEnumerable<Triple> tripleCollection = new List<Triple>(
                new Triple[] { new Triple(1, 2, 3), new Triple(22, 33, 44), new Triple(1, 2, 3), new Triple(1, 2, 3) });
            string expected = @"(1, 2, 3), (22, 33, 44), (1, 2, 3), (1, 2, 3)";
            string actual;
            actual = TripleExtensions.AsString(tripleCollection);
            Assert.AreEqual(expected, actual);
        }

        [TestMethod()]
        public void AsStringEmptyTest()
        {
            IEnumerable<Triple> tripleCollection = new List<Triple>();
            string expected = null;
            string actual;
            actual = TripleExtensions.AsString(tripleCollection);
            Assert.AreEqual(expected, actual);
        }
    }
}
